<html>
	<head>
		<title>finacial.html</title>
		<meta http-equiv="content-type" content="text/html; charset=UTF-8">
		<!--<link rel="stylesheet" type="text/css" href="./styles.css">-->
		<link href="../../css/general1.css" rel="stylesheet" type="text/css" />
		<link href="style/css.css" rel="stylesheet" type="text/css" />
		<script type="text/javascript" src="../../script/hiawardbpm.js"></script>
		<script type="text/javascript" src="../../script/prototype.js"></script>
		<script type="text/javascript" src="/vchzms-hiaward/dwr/engine.js"> </script>
		<script type="text/javascript" src="/vchzms-hiaward/dwr/util.js"> </script>
		<script type="text/javascript"
			src="/vchzms-hiaward/dwr/interface/OutService.js"></script>
		<script type="text/javascript"
			src="/vchzms-hiaward/dwr/interface/Dao.js"></script>
		<script type="text/javascript">
        function subForm(msg){
          var webData=buildWebData(msg);
          var xmlMsg=window.dialogArguments;
          //alert(xmlMsg.getXmlDocument().xml);
          xmlMsg.setCommand(12);
          xmlMsg.setWebData(webData);
          xmlMsg.buildXML();
          var url="/vchzms-hiaward/ProcessAjaxHandler";
          alert(xmlMsg.getXmlDocument().xml);
          new Ajax.Request(url,{
          method:'post',
          postBody:xmlMsg.getXmlDocument().xml,
          contentType:'application/x-www-form-urlencoded',
          encoding:'UTF-8',
          onComplete:function(transport){
	          try{
		          if(200==transport.status){
		               window.close();
		              }
		          if(400==transport.status){
		              }
	          }catch(err){
	              alert('js异常');
	          }
          }
       });
         }
         function buildWebData(msg){
         var xmlMsg=window.dialogArguments;
          var webData=new WebData();
          var vchsid=xmlMsg.getWebData().getProperty('vchsid');
          var accno=document.getElementById("accno").value;
          var amount=document.getElementById("amount").value;
          var vchno=document.getElementById("vchno").value;
          var batno=document.getElementById("batno").value;
          var vchtype=document.getElementById("vchtype").value;
          var vchdate=document.getElementById("vchdate").value;
          var vchpwd=document.getElementById("vchpwd").value;
          webData.setProperty('accno',accno);
          webData.setProperty('amount',amount);
          webData.setProperty('vchno',vchno);
          webData.setProperty('vchtype',vchtype);
          webData.setProperty('vchdate',vchdate);
          webData.setProperty('vchpwd',vchpwd);
          webData.setProperty('vchsidInput',vchsid);
          webData.setProperty('batno',batno);
          alert(msg);
          webData.setProperty('chkres',msg);
          webData.setProperty('chkstate','3');
          return webData;
         }
         //获得客户信息 
         function getCustInfo(){
         var accno=$('accno').value;
            OutService.Z_BAPI_ACCOUNT_INFO(accno,function(data){
              var custid=data.custId;
              $('coName').innerHTML=data.accName;
              OutService.Z_BAPI_BP_GET_ORG_DETAIL(custid,function(data){
                $('connector').innerHTML=data.connector;
                $('tel').innerHTML=data.tel;
              });
           });
           alert("此帐户为财政户！");
           window.location.href="finacial.html";
         }
         //获得票据信息
         function getVoucherInfo(){
          var xmlMsg=window.dialogArguments;
	     var vchsid=xmlMsg.getWebData().getProperty('vchsid');
         Dao.getVoucherById(vchsid,function(data){
          $('accno').value=data.accno;
          $('vchno').value=data.vchno;
          $('amount').value=data.amount;
          $('vchtype').value=data.vchtype;
          $('vchpwd').value=data.vchpwd;
          $('vchdate').value=data.vchdate;
          OutService.Z_BAPI_ACCOUNT_INFO(data.accno,function(data){
              var custid=data.custId;
              alert(data.accName);
              $('coName').innerHTML=data.accName;
              OutService.Z_BAPI_BP_GET_ORG_DETAIL(custid,function(data){
                $('connector').innerHTML=data.connector;
                $('tel').innerHTML=data.tel;
              });
           });
            });
         }
    </script>
	</head>
	<body leftmargin="0" topmargin="0">
		<center>
			<table width="900" border="1" cellspacing="0" cellpadding="0">
				<tr>
					<td width="65%" height="80">
						<table width="100%" border="1" cellspacing="0" cellpadding="0">
							<tr>
								<td>
									<img src="pic/00000001.jpg" width="601" height="283"/>
								</td>
							</tr>
							<tr>
								<td>
									<img src="pic/00000002.jpg" width="601" height="283" />
								</td>
							</tr>
						</table>
					</td>
					<td width="35%" height="" valign="top">
						<span style="width: 28%" class="title1"> <a name="tag"
							class="selectli1">客户信息</a> </span>
				<table width="100%" border="0" cellpadding="0" cellspacing="0"
							class="tablist1">

							<tr>
								<td width="24%">
                                      公司名称:
								</td>
								<td>
									<span id="coName">北京紫枫科技</span>
								</td>
							</tr>
							<tr>
								<td>
								  联系人:
								</td>
								<td>
									<span id="connector">黄兵</span>
								</td>
							</tr>
							<tr>
								<td>
								 联系电话:
								</td>
								<td>
									<span id="tel">123123</span>
								</td>
							</tr>
							<tr>
								<td>
								 备注:
								</td>
								<td>
									<span id="remark"></span>
								</td>
							</tr>
						</table>
						<span style="width: 28%" class="title1"> <a name="tag"
							class="selectli1">财政户</a> </span>
				<table width="100%" border="0" cellpadding="0" cellspacing="0"
							class="tablist1">

							<tr>
								<td width="24%">
                                      财局编码:
								</td>
								<td>
									<span id="">
									<input type="text" value="212213">
									</span>
								</td>
							</tr>
							<tr>
								<td>
								  签约帐户类型:
								</td>
								<td>
									<span id="">
									  <input type="text" value="零余额合并账户">
									</span>
								</td>
							</tr>
							<tr>
							 <!-- 根据财局编码，显示可选择的支付方式 -->
								<td>
								 支付方式:
								</td>
								<td>
									<span id="">
									 <select>
									  <option value='0'>授权支付</option>
									  <option value='1'>直接支付</option>
									 </select>
									</span>
								</td>
							</tr>
							<tr>
								<td>
								 支付类型:
								</td>
								<td>
									<span id="">支付</span>
								</td>
							</tr>
							<tr>
								<td width="24%">
								<!-- 如果签约账户类型为零余额合并账户 才显示此项 -->
                                      是否使用额度支付:
								</td>
								<td>
									<span id="">
									  <select>
									   <option value='0'>是</option>
									   <option value='1'>否</option>
									  </select>
									</span>
								</td>
							</tr>
							<tr>
								<td>
								  支付指令编号:
								</td>
								<td>
								    <!-- 1、	支付方式为授权支付，且财局编码为北京、海淀、石家庄、上海时出现此字段
2、	支付方式为直接支付、且财局编码为北京、海淀时出现此字段 -->
									<span id="">
									 <input type='text'/>
									</span>
								</td>
							</tr>
							<tr>
							 <!-- 财局编码为北京、海淀时出现此字段 -->
								<td>
								 付款凭证号:
								</td>
								<td>
									<span id=""><input type="text"/></span>
								</td>
							</tr>
							<tr>
							<!-- 支付方式为直接支付，且财局编码为广州时出现此字段 -->
								<td>
								 凭证字号:
								</td>
								<td>
									<span id=""><input type="text"/></span>
								</td>
							</tr>
							<tr>
								<td>
								 支付金额:
								</td>
								<td>
									<span id="">
									 <input type="text"/>
									</span>
								</td>
							</tr>
						</table>
						<span style="width: 28%" class="title1"><a name="tag"
							class="selectli1">票据信息</a></span>
						<table width="100%" border="0" cellpadding="0" cellspacing="0"
							class="tablist1">
							<tr>
								<td width="24%">
								 帐号:
								</td>
								<td width="76%">
									<input id="accno" name="accno" type="text" value="2132123"
										style="border-color: #CAE4FF; size: 60; width: 160px; border-width: thin"
										/>
								</td>
							</tr>
							<tr>
								<td width="24%">
								收款人名称:
								</td>
								<td width="76%">
									<input id="receive" name="receive" type="text" value=""
										style="border-color: #CAE4FF; size: 60; width: 160px; border-width: thin"
										/>
								</td>
							</tr>
							<tr>
								<td>
								  凭证类型:
								</td>
								<td>
									<input name="vchtype" type="text" value="213" id="textfield" maxlength="1" size="1"/>
								</td>
							</tr>
							<tr>
								<td>
								批次号:
								</td>
								<td>
									<input name="batno" type="text" id="batno" value="1" maxlength="1" size="1"/>
								</td>
							</tr>
							<tr>
								<td>
								凭证号:
								</td>
								<td>
									<input name="vchno" type="text" value="1213" id="textfield" />
								</td>
							</tr>
							<tr>
								<td>
								金额:
								</td>
								<td>
									<input name="amount" type="text" value="123444" id="textfield" />
								</td>
							</tr>
							<tr>
								<td>
								凭证日期:
								</td>
								<td>
									<input name="vchdate" type="text" value="2009-02-03" id="textfield" />
								</td>
							</tr>
							
							<tr>
								<td>
								密码:
								</td>
								<td>
									<input name="vchpwd" type="text" value="****" id="textfield" />
								</td>
							</tr>
							
							<tr>
								<td>
								密码结果:  
								</td>
								<td>
                                 <span id="pswdres" >通过</span>
								</td>
							</tr>
							<tr>
								<td>
								退票理由:
								</td>
								<td>
									<select id="rtreason" name="rtreason">
										<option value="qq">
                                                票面涂改
										</option>
										<option value="qq">
										</option>
										<option value="qq">޷��
										</option>
										<option value="qq">
										</option>
										<option value="qq">
										</option>
										<option value="qq">
										
										</option>
										<option value="qq">
										</option>
										<option value="qq">
										</option>
										<option value="qq">
										</option>
										<option value="qq">
										</option>
									</select>
								</td>
							</tr>
						</table>
					</td>

				</tr>

			</table>
			<table width="40%" border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td align="center" valign="bottom">

						<label>
							<input type="button" name="Submit" value="审票通过" class="btn1"
								onclick="subForm('2')" />
						</label>
						<label>
							<input type="button" name="Submit" value="审票不通过" class="btn1"
								onclick="subForm('3')" />
						</label>
						<label>
							<input type="button" name="Submit2" value="手工处理" class="btn1"
								onclick="subForm('4')" />
						</label>
						<label>
							<input type="button" name="Submit2" value="下一条" class="btn1" />
						</label>
						<input type="button" name="Submit3" value="关闭" class="btn1"
							onClick="" />

					</td>
				</tr>
			</table>
			<script type="text/javascript">
             
              getVoucherInfo();
            </script>
		</center>
	</body>
</html>


